
clear
version 18.5
* #delimit ;
cd ".../andersson_2025_replication/"

*     
*     ****************************************************************
*     ****************************************************************
*       File-Name:      andersson_ejpr_replication.do                        
*       Date:           2025/11/18                                    
*       Author:         PA                                             
*       Purpose:        Replication files for Andersson 2025                                               
*       Machine:        iMac_PA                                       
*     ****************************************************************  
*     ****************************************************************  


*     ****************************************************************  


******************** 
*Main Paper
********************

****** Figure 2: Direct share over time

*Load yearly data BDR govrev
clear
use "yearly.dta"

collapse (mean) directtaxshare centaxdirectsh , by(year)
tsline directtaxshare centaxdirectsh, scheme(s1mono)


****** Table 2: reanalysis of Table 2 in BDR

*Load 5yr average data
clear
use "5yr.dta"

*** Without controls

*Replicating BDR with BDR: Executive recruitment
xi: xtreg directtaxshare execrecruit_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag i.year, fe vce(cluster ctyid)	
xi: xtreg directtaxshare execrecruit_lag i.year if e(sample), fe vce(cluster ctyid)

* Govrev with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag i.year if e(sample), fe vce(cluster ctyid)	

*** With controls

*Replicating BDR with BDR: Executive recruitment
xi: xtreg directtaxshare execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)
xi: xtreg directtaxshare execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

**** Without controls

*Replicating BDR with BDR: Political contestation
xi: xtreg directtaxshare polcontest_lag i.year, fe vce(cluster ctyid)	

*BDR with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag i.year, fe vce(cluster ctyid)	
xi: xtreg directtaxshare polcontest_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag i.year if e(sample), fe vce(cluster ctyid)	

***With controls

*Replicating BDR with BDR: Political contestation
xi: xtreg directtaxshare polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year , fe vce(cluster ctyid)	
xi: xtreg directtaxshare polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

	
	
**** Table 3: Decomposing direct revenue

*Load data
clear
use "5yr.dta"

xi: xtreg centaxincomesh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxincomesh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)

xi: xtreg centaxpropertysh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxpropertysh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)

xi: xtreg centaxexcisesh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxexcisesh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)

xi: xtreg centaxconssh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxconssh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)

xi: xtreg centaxincomesh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxincomesh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)

xi: xtreg centaxpropertysh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxpropertysh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)

xi: xtreg centaxexcisesh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxexcisesh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)

xi: xtreg centaxconssh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxconssh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)




******************** 
*APPENDIX
********************

**** Table 2: Comparing govrev and Mitchell

*load Mitchell and Govrev data
clear
use "govrev_vs_mitchell.dta"

** Check which variables are available by year in Govrev
egen nonmiss_centaxtot = rownonmiss(centaxtot) 
egen nonmiss_centaxdirect = rownonmiss(centaxdirectsh)
egen nonmiss_centaxbudget = rownonmiss(centaxincomesh centaxcustomssh centaxexcisesh centaxconssh centaxpropertysh)
replace nonmiss_centaxbudget = 1 if nonmiss_centaxbudget>=1 & !missing(nonmiss_centaxbudget)

bysort year: egen countries_nonmiss_centaxdirect = sum(nonmiss_centaxdirect) 
bysort year: egen countries_nonmiss_centaxtot = sum(nonmiss_centaxtot) 
bysort year: egen countries_nonmiss_centaxbudget = sum(nonmiss_centaxbudget) 

** Check which variables are available by year in Mitchell
egen nonmiss_centaxdirect_Mitchell = rownonmiss(centaxdirectsh_Mitchell) 
egen nonmiss_centaxtot_Mitchell = rownonmiss(centaxtot_Mitchell) 
egen nonmiss_centaxbudget_Mitchell = rownonmiss(centaxincomesh_Mitchell centaxpropertysh_Mitchell centaxcustomssh_Mitchell centaxexcisesh_Mitchell centaxconssh_Mitchell)
replace nonmiss_centaxbudget_Mitchell = 1 if nonmiss_centaxbudget_Mitchell>=1 & !missing(nonmiss_centaxbudget_Mitchell)

bysort cname: egen individ_nonmiss_direct_Mitch = sum(nonmiss_centaxdirect_Mitchell)
bysort cname: egen individ_nonmiss_tot_Mitch = sum(nonmiss_centaxtot_Mitchell)
bysort cname: egen individ_nonmiss_budget_Mitch = sum(nonmiss_centaxbudget_Mitchell)

bysort cname: egen individ_nonmiss_centaxdirect = sum(nonmiss_centaxdirect)
bysort cname: egen individ_nonmiss_centaxtot = sum(nonmiss_centaxtot)
bysort cname: egen individ_nonmiss_centaxbudget = sum(nonmiss_centaxbudget)

sort cname year
list cname independence_year individ_nonmiss_centaxtot individ_nonmiss_centaxdirect individ_nonmiss_centaxbudget individ_nonmiss_tot_Mitch individ_nonmiss_direct_Mitch individ_nonmiss_budget_Mitch if year==2000, noobs clean



**** Table 5: Replication of Table 1 in BDR

*Load 5 year average data
clear
use "5yr.dta"

*Dependent variable: Tax/GDP

*BDR with common sample. No controls
xi: xtreg centaxgdp execrecruit_lag i.year, fe vce(cluster ctyid)
xi: xtreg taxgdp execrecruit_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample. No controls
xi: xtreg centaxgdp execrecruit_lag i.year if e(sample), fe vce(cluster ctyid)

*BDR with common sample. With controls
xi: xtreg centaxgdp execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxgdp_lag i.year, fe vce(cluster ctyid)
xi: xtreg taxgdp execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 taxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample. With controls
xi: xtreg centaxgdp execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxgdp_lag i.year if e(sample), fe vce(cluster ctyid)


** Independent variable: political contestation 

*BDR with common sample. No controls
xi: xtreg centaxgdp polcontest_lag i.year, fe vce(cluster ctyid)
xi: xtreg taxgdp polcontest_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample. No controls
xi: xtreg centaxgdp polcontest_lag i.year if e(sample), fe vce(cluster ctyid)

*BDR with common sample. With controls
xi: xtreg centaxgdp polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxgdp_lag i.year, fe vce(cluster ctyid)
xi: xtreg taxgdp polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 taxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample. With controls
xi: xtreg centaxgdp polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxgdp_lag i.year if e(sample), fe vce(cluster ctyid)



**** Table 6: Five-year average, all models

*Load 5 year average data
clear
use "5yr.dta"

*** Without controls

*Replicating BDR with BDR: Executive recruitment
xi: xtreg directtaxshare execrecruit_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag i.year, fe vce(cluster ctyid)	
xi: xtreg directtaxshare execrecruit_lag i.year if e(sample), fe vce(cluster ctyid)

* Govrev with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag i.year if e(sample), fe vce(cluster ctyid)	

*** With controls

*Replicating BDR with BDR: Executive recruitment
xi: xtreg directtaxshare execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)
xi: xtreg directtaxshare execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

**** Without controls

*Replicating BDR with BDR: Political contestation
xi: xtreg directtaxshare polcontest_lag i.year, fe vce(cluster ctyid)	

*BDR with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag i.year, fe vce(cluster ctyid)	
xi: xtreg directtaxshare polcontest_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag i.year if e(sample), fe vce(cluster ctyid)	

***With controls

*Replicating BDR with BDR: Political contestation
xi: xtreg directtaxshare polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year , fe vce(cluster ctyid)	
xi: xtreg directtaxshare polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

	

**** Table 7: Yearly data

*load yearly data
clear
use "yearly.dta"

*** Without controls

*Replicating BDR with BDR: Executive recruitment
xi: xtreg directtaxshare execrecruit_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag i.year, fe vce(cluster ctyid)	
xi: xtreg directtaxshare execrecruit_lag i.year if e(sample), fe vce(cluster ctyid)

* Govrev with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag i.year if e(sample), fe vce(cluster ctyid)	

*** With controls

*Replicating BDR with BDR: Executive recruitment
xi: xtreg directtaxshare execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year, fe vce(cluster ctyid)
xi: xtreg directtaxshare execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Executive recruitment
xi: xtreg centaxdirectsh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

**** Without controls

*Replicating BDR with BDR: Political contestation
xi: xtreg directtaxshare polcontest_lag i.year, fe vce(cluster ctyid)	

*BDR with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag i.year, fe vce(cluster ctyid)	
xi: xtreg directtaxshare polcontest_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag i.year if e(sample), fe vce(cluster ctyid)	

***With controls

*Replicating BDR with BDR: Political contestation
xi: xtreg directtaxshare polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year, fe vce(cluster ctyid)

*BDR with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year , fe vce(cluster ctyid)	
xi: xtreg directtaxshare polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

*Govrev with common sample: Political contestation
xi: xtreg centaxdirectsh polcontest_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year if e(sample), fe vce(cluster ctyid)

	

**** Figure 2: Influential observations

*load yearly data
clear
use "yearly.dta"

*Based on results of column 5 in Table 7

***** DFBETA
reg centaxdirectsh execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 centaxdirectsh_lag centaxgdp_lag i.year i.ctyid

	keep if e(sample)
reg directtaxshare execrecruit_lag warmobilization_lag lngdppc_lag leftgov_lag ///
	regiontrend1-regiontrend6 directtaxshare_lag taxgdp_lag i.year i.ctyid if e(sample)


dfbeta execrecruit_lag
gen cutoffdfbeta = abs(_dfbeta_1) > 2/sqrt(e(N)) & e(sample)

gen bigbeta = cutoffdfbeta > 0
gen ind = _n

gen lab_year  = string(year)
gen lab_cname = cname

	
twoway ///
    (scatter _dfbeta_1 ind, msymbol(oh)) ///
    (scatter _dfbeta_1 ind if bigbeta, ///
        msymbol(oh) ///
        mlabel(lab_year) mlabpos(1) mlabsize(tiny)) ///
    (scatter _dfbeta_1 ind if bigbeta, ///
        msymbol(oh) ///
        mlabel(lab_cname) mlabpos(3) mlabsize(tiny)) ///
    , ///
    scheme(s1mono) ///
    legend(off) ///
    ylabel(-0.3(0.1)0.3) ///
	ytitle(Dfbeta) ///
    yscale(range(-0.3 0.3))

	
**** Figure 3: Comparing direct share from Govrev and BDR

*load yearly data 
clear
use "yearly.dta"

*BDR starts in 1870
drop if year<1870

collapse (mean) directtaxshare centaxdirectsh , by(year)

tsline directtaxshare centaxdirectsh, ///
   scheme(s1mono) ///
   xscale(range(1870 2010)) ///
   xlabel(1870(15)2010) ///
   yscale(range(0 0.70)) ///
   ylabel(0(0.10)0.70) ///
   ytitle("Share of Total Central Tax Revenue") ///
   ///
   lcolor(black black) ///
   lpattern(solid shortdash) ///
   ///
   legend(order(1 "BDR" 2 "Govrev"))
